package testing;

import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author user
 */
public class ClientTCP {

    public static void main(String[] args) {
        try {
            Socket s = new Socket("127.0.0.1", 9999);
            (new ClientThread(s)).start();
            Thread.sleep(5000);
            s = new Socket("127.0.0.1", 9999);
            (new ClientThread(s)).start();
            Thread.sleep(5000);
            s = new Socket("127.0.0.1", 9999);
            (new ClientThread(s)).start();
            Thread.sleep(5000);
            s = new Socket("127.0.0.1", 9999);
            (new ClientThread(s)).start();
        } catch (InterruptedException ex) {
            Logger.getLogger(ClientTCP.class.getName()).log(Level.SEVERE, null, ex);
        } catch (UnknownHostException ex) {
            Logger.getLogger(ClientTCP.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(ClientTCP.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
